
export class Rect {
    constructor(x, y, w, h) {
        this.x = x;
        this.y = y;
        this.w = w;
        this.h = h;
        this.x1 = x + w;
        this.y1 = y + h;
    }
    testIn(x, y) {
        return x >= this.x && x <= this.x1 &&
            y >= this.y && y <= this.y1;
    }
}
